import { TableProps } from "antd";
import { type } from "os";
import React from "react";

/**
 * 用户管理数据类型
 */
export interface UserManageType {
  id: number;
  userName: string;
  avatar: React.ReactNode;
  age: number;
  sex: string;
  birthday: string;
  address: string;
  personalSignature: string;
  status: number;
  description: string;
}

export interface selectedPostRowsType {
  selectedRowKeys?: React.Key[];
  selectedRows?: PostType[];
}
export interface selectedUserRowsType {
  selectedRowKeys?: React.Key[];
  selectedRows?: UserManageType[];
}
export interface selectedKindsRowsType {
  selectedRowKeys?: React.Key[];
  selectedRows?: KindsManageType[];
}
/**
 * 表格数据类型
 */

export interface TableComProps {
  dataSource: any[];
  columns: any[];
  paginationOptions?: PaginationProps;
  rowSelection?: TableProps<any>["rowSelection"];
  className?: string;
  expandable?: any;
}

/**
 * 分页
 */
export interface PaginationProps {
  current: number;
  pageSize: number;
  showQuickJumper?: boolean;
  showTotal?: (total: number) => string;
  total?: number;
  onChange?: (current: number, pageSize: number) => void;
}
/**
 * 帖子数据类型
 *
 */
export type PostType = {
  postPhoto: string;
  id: number;
  postAuthorName: string;
  postContent: string;
  postTitle: string;
  postSummary: string;
  postType: string;
  postStatus: number;
  cause: string;
  createTime: string;
};
export type OptionType = {
  value: string;
  label: string;
};

export type CourseFormType = {
  videoHead: Blob;
  videoName: string;
  videoLink: string;
  videoStatus: number;
  videoIsApply: number;
  videoType: string;
};

export type KindsManageType = {
  differ: string;
  id: number;
  typeName: string;
};
